package com.mj.activity.publish;

import java.io.File;

import android.content.Intent;
import android.os.Bundle;

import com.mj.MJApplaction;
import com.mj.R;
import com.mj.base.BaseActivity;

//发布文字
public class PubtxtActivity extends BaseActivity {
	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentView(R.layout.activity_pubtxt);
		init();
	}

	private void init() {
		// title
		aq.id(R.id.btn_left).clicked(this, "back");
		aq.id(R.id.btn_right).gone();
		aq.id(R.id.tv_title).text(MJApplaction.userInfo.getNickname());
		// 图片
		showImg();
		// next
		aq.id(R.id.button1).clicked(this, "back");
	}

	private void showImg() {
		Intent intent = getIntent();
		if (intent == null) {
			return;
		}
		Bundle extras = intent.getExtras();
		if (extras != null) {
			File file = extras.getParcelable("file");
			aq.id(R.id.imageView1).image(file, 96);
		}
	}

}
